<%@ page import="Dao.usersDAO" %>
<%@ page import="JavaBean.users" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page isELIgnored="false"%>
<html>
<head>
	<title>修改用户信息</title>
	<link rel="stylesheet" href="../assets/css/layui.css">
</head>
<body>

<%
	String ID = request.getParameter("id");
	usersDAO dao= new usersDAO();/*Dao.usersDAO.getAllUsersByID(usersDAO.java:85)*/
	users users = dao.getAllUsersByID(ID);
	pageContext.setAttribute("ID",ID);
	pageContext.setAttribute("users",users);
	pageContext.setAttribute("userGender",users.getGender());
%>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	<legend>修改用户信息</legend>
</fieldset>

<form class="layui-form" action="doEditUesradmin.jsp" method="post">
	<input name="id" value="${ID}" style="display: none">
	<div class="layui-form-item">
		<label class="layui-form-label">修改名字</label>
		<div class="layui-input-inline">
			<input type="text" name="uName" id="username" value="${users.name}" lay-verify="pass" placeholder="请输入用户名" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">起一个容易记住的名字吧</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">更改密码</label>
		<div class="layui-input-inline">
			<input type="text" name="uPwd" id="password" value="${users.password}" lay-verify="pass" placeholder="请输入密码" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">请填写6到12位密码</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">设置邮箱</label>
		<div class="layui-input-inline">
			<input type="text"  value="${users.email}" name="uEmail" lay-verify="pass" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">方便联系的邮箱</div>
	</div>


	<div class="layui-form-item">
		<label class="layui-form-label">性别</label>
		<div class="layui-input-block">
			<input type="radio" value="男" name="uGender" title="男" >
			<input type="radio" value="女" name="uGender" title="女">
		</div>
	</div>
	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">用户简介</label>
		<div class="layui-input-block">
			<textarea placeholder="请输入内容" class="layui-textarea" name="uResume" >${users.resume}</textarea>
		</div>
	</div>

	<div class="layui-form-item">
		<div class="layui-input-block">
			<input type="submit" class="layui-btn" name="save" value="提交" />
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			<a href="./usersManager.jsp"><button type="button" class="layui-btn layui-btn-primary">返回</button></a>
		</div>
	</div>
</form>
<script src="../assets/layui.all.js"></script>

</body>
</html>
